<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/pages/templates/template.xhtml">
	<ui:define name="title">
		<h:outputText value="#{msgInbox.lblTitulo}" />
	</ui:define>
	<ui:define name="content">
		<f:loadBundle basename="i18n.msg-inbox" var="msgInbox" />
		<h:form id="formCabecera">
			<p:panel header="#{msgInbox.lblFiltros}">
				<h:panelGrid columns="7">
					<p:outputLabel value="#{msgInbox.lblNombre}" />
					<p:inputText value="#{inboxUI.nombreProyecto}"/>
					<p:outputLabel value="#{msgInbox.lblRol}" />
					<p:selectOneMenu value="#{inboxUI.codigoRol}">
						<f:selectItems value="#{inboxUI.listRoles}"/>
					</p:selectOneMenu>
					<p:outputLabel value="#{msgInbox.lblEstado}" />
					<p:selectOneMenu value="#{inboxUI.estado}">
						<f:selectItems value="#{inboxUI.listEstado}"/>
					</p:selectOneMenu>
					<p:commandButton value="#{msgInbox.btnCrearProyecto}" action="#{inboxUI.actionGoCreateProject}">
					</p:commandButton>
				</h:panelGrid>
			</p:panel>
				<p:dataTable value="#{inboxUI.data}" paginator="true" var="row"
					id="dataTableCabecera"
					paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} ">
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msgInbox.lblNombre}" />
						</f:facet>
						<h:outputText value="#{row.nombreProyecto}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msgInbox.lblRol}" />
						</f:facet>
						<h:outputText value="#{row.nombreRol}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msgInbox.lblEstado}" />
						</f:facet>
						<h:outputText value="#{row.estadoProyecto}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msgInbox.lblAccion}" />
						</f:facet>
						<p:commandLink update="@form">
							<p:graphicImage url="../../images/edit.png" />
						</p:commandLink>
						<p:commandLink process="@this">
							<p:graphicImage url="../../images/delete.png" />
						</p:commandLink>
						<p:commandLink process="@form" update="@form" action="#{inboxUI.actionGoImplementation}" ajax="false">
							<p:graphicImage url="../../images/process.png" title="#{msgInbox.lblImplementacion}"/>
							<f:param name="idProject" value="#{row.id.codigoProyecto}" />
						</p:commandLink>
						<p:commandLink process="@form" update="@form" action="#{inboxUI.actionGoEvaluation}" ajax="false">
							<p:graphicImage url="../../images/evaluation.png" title="#{msgInbox.lblEvaluacion}"/>
							<f:param name="idProject" value="#{row.id.codigoProyecto}" />
						</p:commandLink>
					</p:column>
				</p:dataTable>
		</h:form>
	</ui:define>
</ui:composition>
</html>